package com.lxl.demo01.domain;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.stereotype.Component;

import java.sql.Timestamp;

@Component
@Data
@AllArgsConstructor
@NoArgsConstructor
public class DoAlert {
    private Long id;
    private Integer monitorType;
    private Integer processDefId;
    private Integer taskInstanceId;
    private String tableId;
    private String target;
    private Long alertDefineId;
    private Integer priority;
    private String content;
    private Integer status;
    private Integer times;
    private Long firstTriggerTime;
    private Long lastTriggerTime;
    private Long createdBy;
    private Long updateBy;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") // 注解 @JsonFormat 指定返回给前端的格式
    @JSONField(format = "yyyy-MM-dd HH:mm:ss") // 注解 @JSONField 可以指定该类序列化的时候如何处理该时间变量
    private Timestamp createTime; // Timestamp可以存储到时间，Date存储到日期
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Timestamp updateTime;
    private Integer workspaceId;
}
